package lsm

import (
	"math/rand"
	"time"
)

// fnRandomizeInt64 returns int64 value from v to v*1.3
func fnRandomizeInt64(v int64) int64 {
	return v + v*gRand.Int63n(30)/100
}

// fnRandomizeDuration returns duration value from v to v*1.3
func fnRandomizeDuration(v time.Duration) time.Duration {
	i := int64(v)
	return time.Duration(fnRandomizeInt64(i))
}

var gRand = rand.New(rand.NewSource(time.Now().UnixNano()))
